 package commands.gameCommand
{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	
	public class Proximity extends Sprite
	{
		public function Proximity()
		{
			CommandFactory.type = CommandFactory.NOMAL;
			this.addEventListener(Event.ADDED_TO_STAGE,add);

			var gameboard:Gameboard = new Gameboard();
			var gameboardData:GameboardData = GameboardData.getInstance();
			gameboardData.columns = 10;
			gameboard.data = gameboardData;
			addChild(gameboard);
			gameboard.x = 20;
			gameboard.y = 20;
			var gamePlayers:GamePlayers = GamePlayers.getInstance();
			gamePlayers.addGamePlayer(new GamePlayer());
			gamePlayers.addGamePlayer(new GamePlayer());
			GameboardData.getInstance().nextGamePiece();
		}
		private function add(event:Event):void{
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
		}
	}
}